﻿using System;

namespace Workstation.ServiceModel.Ua
{
    /// <summary>
    /// IEncodable 类型的类的属性，用于指示 xml 编码 id。
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
    public sealed class XmlEncodingIdAttribute : Attribute
    {
        public XmlEncodingIdAttribute(string s)
        {
            this.NodeId = ExpandedNodeId.Parse(s);
        }

        public ExpandedNodeId NodeId { get; }
    }
}